import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './symptomtime.css'
import { AtSteps,AtRadio,AtButton } from 'taro-ui'
import {$redirectTo} from '../../../global'
import app from '../../../main.js'
export default class SymptomTime extends Component {

  config = {
    navigationBarTitleText: '快速问诊'
  }
  constructor () {
    super(...arguments)
    this.state = {
      current: 0,
      value: ''
    }
  }
  onChange (current) {
    this.setState({
      current
    })
    switch(this.state.current){
      case 0:
      break;
      case 1:
      break;
      case 2:
      break;
      case 3:
      break;
      case 4:
      break;
      case 5:
      break;
      case 6:
      break;
      case 7:
      break;
    }
  }
  handleChange (value) {
    this.setState({
      value
    })
  }
  wenti=()=>{
    app.redirectTo("../hastreat/hastreat")
  }
  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  render () {
    const items = [
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' }

      ]
    return (
      <View className='symptom-time'>
        <AtSteps
        className='steps'
        items={items}
        current={this.state.current}
        onChange={this.onChange.bind(this)}
      />
      <View className='title'>本次患病或者症状出现多久了？</View>
      <AtRadio
        options={[
          { label: '一周内', value: 'option1' },
          { label: '一月内', value: 'option2' },
          { label: '半年内', value: 'option3' },
          { label: '大于半年', value: 'option4'}
        ]}
        value={this.state.value}
        onClick={this.handleChange.bind(this)}
      />
      <View className='btn-box' onClick={this.wenti}><AtButton className='next-btn' full>下一步</AtButton></View>
      </View>
    )
  }
}

